#include<bits/stdc++.h>

using namespace std;
int uniform[2][2]={{129,25},{130,27}};

int main(){
    //关闭输入输出同步流 提高效率
    std::ios::sync_with_stdio(false);
    int n,sex,h,w;
    cin>>n;
    while(n){
        cin>>sex>>h>>w;
        if(uniform[sex][0]>h)
            cout<<"duo chi yu! ";
        else if (uniform[sex][0]==h)
            cout<<"wan mei! ";
        else
            cout<<"ni li hai! ";
        if(uniform[sex][1]>w)
            cout<<"duo chi rou!\n";
        else if(uniform[sex][1]==w)
            cout<<"wan mei!\n";    
        else
            cout<<"shao chi rou!\n";            
        n--;
    }

    return 0;
}